var http=require('http');

var route=require('./route.js');

// 创建服务器
 var server=http.createServer(function(req,res){
 	if (req.url=='/') {
 		route.showIndex(req,res);
 	}else if (req.url=='/stu/') {
 		route.showStu(req,res);
 	}else{
 		route.show404(req,res);
 	}
 });

 // 运行服务器
 server.listen(3000,'127.0.0.1');